package com.iwdnb.gkgz.application.kline;

import java.util.List;

import com.iwdnb.gkgz.common.model.dto.StockDayData;
import org.apache.commons.collections4.CollectionUtils;

public class ShapeUtils {

    public static boolean isSellKline(StockDayData stockDayData,List<StockDayData> beforeDatas) {
        List<ShapeEnum> shapeEnums = ShapeEnum.getListByType("sell");
        if (CollectionUtils.isEmpty(shapeEnums)) {
            return false;
        }
        for (ShapeEnum shapeEnum : shapeEnums) {
            if (shapeEnum.getShape().match(stockDayData.getCode(), stockDayData,beforeDatas)) {
                return true;
            }
        }
        return false;
    }
}
